home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / MacPerl 5.0.3 / MacPerl Source ƒ / Perl5 / x2p / s2p.man < prev    next >
Encoding:
Text File  |  1994-12-26  |  2.1 KB  |  93 lines  |  [TEXT/MPS ]

  1. .rn '' }`
  2. ''' $RCSfile: s2p.man,v $$Revision: 4.1 $$Date: 92/08/07 18:29:24 $
  3. ''' 
  4. ''' $Log:    s2p.man,v $
  5. .de Sh
  6. .br
  7. .ne 5
  8. .PP
  9. \fB\\$1\fR
  10. .PP
  11. ..
  12. .de Sp
  13. .if t .sp .5v
  14. .if n .sp
  15. ..
  16. .de Ip
  17. .br
  18. .ie \\n.$>=3 .ne \\$3
  19. .el .ne 3
  20. .IP "\\$1" \\$2
  21. ..
  22. '''
  23. '''     Set up \*(-- to give an unbreakable dash;
  24. '''     string Tr holds user defined translation string.
  25. '''     Bell System Logo is used as a dummy character.
  26. '''
  27. .tr \(*W-|\(bv\*(Tr
  28. .ie n \{\
  29. .ds -- \(*W-
  30. .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  31. .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  32. .ds L" ""
  33. .ds R" ""
  34. .ds L' '
  35. .ds R' '
  36. 'br\}
  37. .el\{\
  38. .ds -- \(em\|
  39. .tr \*(Tr
  40. .ds L" ``
  41. .ds R" ''
  42. .ds L' `
  43. .ds R' '
  44. 'br\}
  45. .TH S2P 1 NEW
  46. .SH NAME
  47. s2p - Sed to Perl translator
  48. .SH SYNOPSIS
  49. .B s2p [options] filename
  50. .SH DESCRIPTION
  51. .I S2p
  52. takes a sed script specified on the command line (or from standard input)
  53. and produces a comparable
  54. .I perl
  55. script on the standard output.
  56. .Sh "Options"
  57. Options include:
  58. .TP 5
  59. .B \-D<number>
  60. sets debugging flags.
  61. .TP 5
  62. .B \-n
  63. specifies that this sed script was always invoked with a sed -n.
  64. Otherwise a switch parser is prepended to the front of the script.
  65. .TP 5
  66. .B \-p
  67. specifies that this sed script was never invoked with a sed -n.
  68. Otherwise a switch parser is prepended to the front of the script.
  69. .Sh "Considerations"
  70. The perl script produced looks very sed-ish, and there may very well be
  71. better ways to express what you want to do in perl.
  72. For instance, s2p does not make any use of the split operator, but you might
  73. want to.
  74. .PP
  75. The perl script you end up with may be either faster or slower than the original
  76. sed script.
  77. If you're only interested in speed you'll just have to try it both ways.
  78. Of course, if you want to do something sed doesn't do, you have no choice.
  79. It's often possible to speed up the perl script by various methods, such
  80. as deleting all references to $\e and chop.
  81. .SH ENVIRONMENT
  82. S2p uses no environment variables.
  83. .SH AUTHOR
  84. Larry Wall <lwall@jpl-devvax.Jpl.Nasa.Gov>
  85. .SH FILES
  86. .SH SEE ALSO
  87. perl    The perl compiler/interpreter
  88. .br
  89. a2p    awk to perl translator
  90. .SH DIAGNOSTICS
  91. .SH BUGS
  92. .rn }` ''
  93.